%% Table: Counterfactual changes by quintile of quality

%    filename = '../../output/tables/fullmodel_cf_baseline.tex';    
    filename = '../../output/tables/Table8_A.tex';    
    delete(filename)
    diary(filename)
    diary on    
    fprintf('\\begin{tabular}{lccccc}'); fprintf('\n');
    fprintf('\\hline\\hline\\\\[-0.8em]'); fprintf('\n');  
    fprintf('& \\multicolumn{5}{c}{Ex-ante quintiles of quality} \\\\[0.2em] \\cline{2-6}\\\\[-0.8em]'); fprintf('\n');   
    fprintf('& \\hspace{0.9cm}1\\hspace{0.9cm} & \\hspace{0.8cm}2\\hspace{0.8cm} & \\hspace{0.7cm}3\\hspace{0.7cm} & \\hspace{0.7cm}4\\hspace{0.7cm} & 5 (largest) \\\\[0.2em] \\hline\\\\[-0.8em]'); fprintf('\n');    
    
    fprintf('\\multicolumn{6}{l}{\\textit{$\\log$(Wage per worker)$\\times 10^{2}$, counterfactual -- initial equilibrium}}'); fprintf('\\\\[0.3em]'); fprintf('\n');
    fprintf('\\quad Exporters\\hspace{0.6cm}'); fprintf(' &%.2f', ge_cf1.eqt_wage_exp); fprintf('\\\\'); fprintf('\n');
    fprintf('\\quad Non-exporters'); fprintf(' &%.2f', ge_cf1.eqt_wage_nonexp_ctn); fprintf('\\\\'); fprintf('\n');
    fprintf('\\quad All Firms'); fprintf(' &%.2f', ge_cf1.eqt_wage_all); fprintf('\\\\[0.3em]'); fprintf('\n');        
            
    fprintf('\\multicolumn{6}{l}{\\textit{$\\log$(Sales)$\\times 10^{2}$, counterfactual -- initial equilibrium}}'); fprintf('\\\\[0.3em]'); fprintf('\n');
    fprintf('\\quad Exporters'); fprintf(' &%.2f', ge_cf1.eqt_sales_exp); fprintf('\\\\'); fprintf('\n');
    fprintf('\\quad Non-exporters'); fprintf(' &%.2f', ge_cf1.eqt_sales_nonexp_ctn); fprintf('\\\\'); fprintf('\n');
    fprintf('\\quad All Firms'); fprintf(' &%.2f', ge_cf1.eqt_sales_all); fprintf('\\\\[0.3em]'); fprintf('\n');          
    
    fprintf('\\hline\\hline'); fprintf('\n');
    fprintf('\\end{tabular}'); fprintf('\n');     
    diary off    
        
   
    